Package Management
Package management overview(/etc/apt):
/etc/apt/- The
apttool inkalimanages softwarepackagesand sources. Instead of usingdpkg, apt lets you install, update, and remove software easily and securely.Repositoriescan be addedmanuallyor with add-apt-repository. Adding trustedGPG keysensures the software’s authenticity. For example, to install Sublime Text (not in default repos), you add its repository and GPG key so it stays updated with your system.
sudo apt autoremove [package-name]
sudo apt perge [packege-name] # removes app and its packages (Everything)
sudo apt install [package-name]
sudo apt update -y
sudo apt list --upgradable
sudo apt upgrade -y
sudo apt search [Packagename] # search packagname
-
dpkgpackage installer.deb:
sudo dpkg -i app.deb -
since subline text editor is not part kali Linux default repositories. When adding software, the integrity of what we download is guaranteed by the use of what is called GPG (Gnu Privacy Guard) keys. These keys are essentially a safety check from the developers saying, "here's our software". If the keys do not match up to what your system trusts and what the developers used, then the software will not be downloaded.
- Let's download the GPG key and use apt-key to trust it:
- wget -qO - https://download.sublimetext.com/sublimehq-pub.gpg | gpg --dearmor | sudo tee /usr/share/keyrings/sublimehq-archive-keyring.gpg > /dev/null
- echo "deb [signed-by=/usr/share/keyrings/sublimehq-archive-keyring.gpg] https://download.sublimetext.com/ apt/stable/" | sudo tee /etc/apt/sources.list.d/sublime-text.list
- sudo apt update && sudo apt install sublime-text
The Update and Upgrade
patching is best practice.
#resources/linux/basics
how the update and upgrading work ?
-
the update will look for the well known Repositories then the upgrade will patch to new version of application running on the machine.
-
lets try it out
-
Some updates require Root privilege's to execute: as u can see in this image these are the old packages
these are the new packages
run auto-remove the old packages
sudo apt autoremove
install a package
sudo apt install packagename
delete package:
sudo apt purge packagename
getting tools from GitHub
-is easy just by getting the GitHub link to clone it to your folder example: git clone
best folder to store your /opt directory so u know where to find it.
Note: always check the user profile if there legit over 700 stars they are safe.
Example of git repos
(1) package fixer for kali if there broken packages
sudo git clone <Link>
/opt:
this directory in Kali Linux is a default directory used to store optional add-ons or packages. It's a common directory in Linux systems where third-party software is installed.